#pragma once

#include <iostream>
#include <unistd.h>
#include <cassert>
#include <string>
#include <array>
#include <vector>
#include <map>
#include <stack>
#include <set>
#include <memory>
#include <variant>
#include <optional>
#include <macro.h>
#include <magic_enum/magic_enum.hpp>

template<class T>
inline static void vector_clear_pointer(std::vector<T> & list) {
  for(auto * item : list) {
    delete item;
    item = nullptr;
  }
  list.clear();
}

template<class T>
inline static std::string enum_name(T e) {
  return std::string(magic_enum::enum_name(e));
}
